home *** CD-ROM | disk | FTP | other *** search
/ Technotools / Technotools (Chestnut CD-ROM)(1993).ISO / lang_c / cug202 / uguide.doc < prev   
Text File  |  1979-12-31  |  26KB  |  925 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.                               USER'S GUIDE FOR KED
  33.  
  34.                           A syntax-directed editor for
  35.                                  KAREL the Robot
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.             A  file  is  a conceptual device used to indicate a  place
  75.           where your program is stored.  Creating  or modifying a file
  76.           is called editing the file.  KED is a syntax-directed editor
  77.           for  the language used by KAREL the Robot [1] [2]. It allows
  78.           you to  create  or modify syntactically correct programs for
  79.           KAREL. This does not  mean  that  your  program is a correct
  80.           solution to  the  problem you are trying to solve or that no
  81.           "error shutoffs" will result; it means only that  there  are
  82.           no lexical or syntactic errors in your program (see Sec. 2.6
  83.           in [1] for a detailed description  of  the  various kinds of
  84.           programming errors). 
  85.  
  86.             You can use (or invoke) KED by typing:
  87.  
  88.                ked newfilename1 newfilename2
  89.  
  90.           Use any legal filenames you wish.  If this is a  new program
  91.           the names  should  be different from any in your directory. 
  92.           The  first file  is  used  by  KED  to  keep  track  of  the
  93.           relationships in your program.  The  second  file is used to
  94.           hold the  text  of  your  program in case you should want to
  95.           make a printed copy. 
  96.  
  97.             If these are new files KED will respond with:
  98.  
  99.                TYPE MN TO SEE MENU
  100.                  BEGINNING-OF-PROGRAM
  101.                    <instruction>
  102.  
  103.           This indicates that the first line  of your program has been
  104.           typed in for you.  The flashing  underscore  indicates where
  105.           your typing will  start  and  the word between brackets what
  106.           sort of command is legal at this point.  Now you can use KED
  107.           to create your program.  See Editing Session I which creates
  108.           a new file. 
  109.  
  110.             If  you  wish  to edit an old file, simply  use  the  same
  111.           format:
  112.  
  113.                ked oldfilename1 oldfilename2
  114.  
  115.           Here, the first file should be  one  created  in  an earlier
  116.           session.  KED will respond by getting  your  files  and then
  117.           printing out  the first 20 lines of your program followed by
  118.           a ?  prompt.   Now  you  can  modify  your program using the
  119.  
  120.           ----------
  121.  
  122.           1. Richard  E.  Pattis,KAREL the Robot A Gentle Introduction
  123.           to the Art of  Programming  (New  York:  John  Wiley & Sons,
  124.           1981)
  125.  
  126.           2. All programs are written in C.
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.           insert and delete commands. 
  140.  
  141.  
  142.  
  143.  
  144.  
  145.  
  146.  
  147.  
  148.  
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.  
  206.             If by mistake you  give  an  old  filename  that  does not
  207.           contain a  KAREL  program  you may exit gracefully by typing
  208.           "q"  and  not saving the program.  This will  allow  you  to
  209.           start over and not cause any damage to your old file. 
  210.  
  211.             Constructs  or control structures are used in a program to
  212.           change  the order of execution of instructions.  In  KAREL's
  213.           language, the constructs begin  with  IF,  WHILE or ITERATE.
  214.           Inside  the constructs there may be a  single  statement  or
  215.           several  statements  (a compound statement).  If a  compound
  216.           statement is used, it is included between the reserved words
  217.           BEGIN and END. If only a single statement is used,  in order
  218.           to make it clear to KED that the construct is completed, you
  219.           must type the NDC (end of construct) command.  An NDC is not
  220.           needed  to  complete  a   construct  containing  a  compound
  221.           statement, since an END  automatically  causes KED to supply
  222.           an NDC.  An  NDC  would  be  required  as  indicated  in the
  223.           following program segment:
  224.  
  225.                ITERATE 6 TIMES
  226.                  turnleft;
  227.                NDC (entered by user to complete ITERATE)
  228.                IF front-is-blocked
  229.                  THEN
  230.                    turnoff
  231.                NDC (entered by user to complete THEN)
  232.                  ELSE
  233.                    move;
  234.                NDC (entered by user to complete ELSE)
  235.                WHILE not-facing-north DO
  236.                  BEGIN
  237.                    move;
  238.                    turnleft
  239.                  END
  240.               (no NDC is required to complete WHILE since a compound
  241.                statement is used inside the construct)
  242.  
  243.             NDC  does  not  add any statements to your program; it  is
  244.           only  used   by   KED  to  structure  relationships  between
  245.           constructs.   For editing purposes, IF, THEN  and  ELSE  are
  246.           considered to be separate  constructs.  If any construct but
  247.           ELSE follows THEN, KED will automatically perform the NDC so
  248.           the instruction will follow the IF.
  249.  
  250.               IF facing-west
  251.                 THEN
  252.                   turnleft;
  253.               NDC (entered by user to complete THEN)
  254.               NDC (automatically performed by KED since the next entry is a
  255.                    not an ELSE)
  256.               pickbeeper;
  257.  
  258.  
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270.  
  271.  
  272.             This  can cause some problems if there are several  nested
  273.           IF's.
  274.  
  275.  
  276.                   IF facing-west
  277.             (5)     THEN
  278.               (4)     IF facing-north
  279.                  (3)    THEN
  280.                    (2)    IF facing-south
  281.                      (1)    THEN
  282.                               move;
  283.                   NDC
  284.                   NDC
  285.                   NDC
  286.                   NDC
  287.                   NDC
  288.                   move;
  289.  
  290.           In order to add the  "move" after the outermost IF (the only
  291.           legal  location, since none of the statements is  compound),
  292.           NDC  must  be  entered  five  times  to  end  the  indicated
  293.           constructs. 
  294.  
  295.             To add  any  of  KAREL's  instructions  or  tests  to your
  296.           program, simply type the  one-  to  three-letter commands at
  297.           the desired location and it will be automatically added.  If
  298.           you  make a typing  error,  the  backspace  character  won't
  299.           correct the  entry;  simply  let  KED  give  you  an INVALID
  300.           COMMAND error message and re-enter the desired instruction. 
  301.           KED  will  attempt to guide you through  this  process  with
  302.           appropriate prompts for the  kind  of  command to enter.  Of
  303.           course, you should always  have written the complete program
  304.           you wish to enter before you sit down at the terminal! 
  305.  
  306.             After an instruction has been added,  KED  will prompt for
  307.           the next  legal  entry: <instruction>, <test>, <new-name> or
  308.           <positive-number>.  Instructions  are  always  automatically
  309.           added to the end of the program. 
  310.  
  311.             When  you  have  added   a   DEFINE-NEW-INSTRUCTION,   KED
  312.           automatically adds a BEGIN and then  will  prompt  for a new
  313.           name; when you have added a WHILE or IF, KED will prompt for
  314.           a test; when you have added an  ITERATE, KED will prompt for
  315.           a positive number.  In any  of  these  three situations, you
  316.           must respond to the prompt; the only other alternative is to
  317.           see the menu.  Except  for these situations, you can use any
  318.           of the edit commands to examine  your  program  at  any time
  319.           while adding instructions.  Whenever you type MN, an updated
  320.           menu  will  be  printed  at  your  terminal.    User-defined
  321.           instructions are added  to  the  menu  following the list of
  322.           INSTRUCTIONS.
  323.  
  324.  
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.  
  337.  
  338.             After an instruction has been added, KED will respond with
  339.           a prompt for the next kind of entry.  After an edit  command
  340.           has been  executed,  KED  will  respond  with a ?. No matter
  341.           where you are examining your program, the next addition will
  342.           always be at the end.  The only way to add an instruction to
  343.           the middle of your program is to type  "i"  to get in insert
  344.           mode and that can only be done  when  your  program has been
  345.           completed (after END-OF-EXECUTION has been added). 
  346.  
  347.             Suppose we had made the following errors  when  we entered
  348.           the program in Editing Session I:
  349.  
  350.             1.  omitted one turnleft from the definition
  351.  
  352.             2.  typed turnleft instead of turnright following the THEN
  353.  
  354.             To  correct  these errors we can  do  the  following  (see
  355.           Editing Session II):
  356.  
  357.             1.  go to the top of the program
  358.  
  359.             2.  go to the end of the definition
  360.  
  361.             3.  insert a turnleft before the END
  362.  
  363.             4.   go  to  the  turnleft  before  the  END  of the  THEN
  364.                 construct
  365.  
  366.             5.  delete the turnleft
  367.  
  368.             6.  insert a turnright
  369.  
  370.             The following conditions must be observed when inserting:
  371.  
  372.             1.  Insertions  can  only  be  performed  when  a complete
  373.                 program has been entered (after NDX has been added). 
  374.  
  375.             2.   Insertions  can  only  be  made  before END,  DEFINE,
  376.                 BEGINNING-  OF-EXECUTION, END-OF-EXECUTION or before a
  377.                 construct following BEGINNING-OF-EXECUTION that is not
  378.                 indented  more  than one level.  This  is  actually  a
  379.                 restriction on entering in the middle of a construct. 
  380.  
  381.             3.  Once  you are in "insert mode" you can continue adding
  382.                 instructions as you did when the  original program was
  383.                 created.   KED  insures that  a  construct  is  always
  384.                 completed before the insert mode is exited. 
  385.  
  386.             4.   To  exit  the  "insert  mode",  simply type any  edit
  387.                 command (except  MN  which  will always print the menu
  388.                 but leave you in the insert mode). 
  389.  
  390.  
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401.  
  402.  
  403.  
  404.             The following conditions must be observed when deleting:
  405.  
  406.             1.  You cannot delete:
  407.  
  408.                   1.  BEGINNING-OF-PROGRAM
  409.  
  410.                   2.  BEGINNING-OF-EXECUTION
  411.  
  412.                   3.  END-OF-EXECUTION
  413.  
  414.             2.  You can only replace:
  415.  
  416.                   1.  tests
  417.  
  418.                   2.  new names
  419.  
  420.                   3.  positive numbers
  421.  
  422.             3.  The  replacement-only restriction for new names can be
  423.                 used  to   the   programmer's  advantage  by  using  a
  424.                 shortened version of the actual name  desired (e.g. ta
  425.                 instead  of  turn-around)  to  reduce  typing  in  the
  426.                 instruction  each  time  it  is used in the  program. 
  427.                 After all the entering and testing has been completed,
  428.                 the  user may then return to KED  and  substitute  the
  429.                 longer  version   in   the   definition.    This  will
  430.                 automatically result in the new version's  replacement
  431.                 of the  old version throughout the program without any
  432.                 additional typing. 
  433.  
  434.             4.  If you try  to  delete  any capitalized word (reserved
  435.                 word), KED will ask  if  you wish to delete the entire
  436.                 construct.   If  you  respond  with a "Y", the  entire
  437.                 construct  will be removed from your program.  If  you
  438.                 delete   a   definition,  all  uses  of  the   defined
  439.                 instruction will  be removed from your program as well
  440.                 as the menu. 
  441.  
  442.             Editing  Session III will  illustrate  some  of  the  more
  443.           complicated insert and delete features of KED.
  444.  
  445.             To  save  the  program,  type  "s".  You  cannot  save  an
  446.           incomplete  program, that is,  NDX  must  always  have  been
  447.           added.  If you are  editing  an  old file, at that time, the
  448.           old  file  will  be  destroyed  and the new version will  be
  449.           saved.  If you do not wish  to  lose  your old copy you must
  450.           make  a "back-up" and place it in your directory before  you
  451.           start the editing session.   If you are creating a new file,
  452.           a  file  will  be  placed in your directory containing  your
  453.           program.    Remember,   the   first    file   contains   the
  454.           relationships and the second contains the text. 
  455.  
  456.             To end the editing session, type q (quit). KED will remind
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.  
  467.  
  468.  
  469.           you  to  save  your program and then end after reading  your
  470.           answer. 
  471.  
  472.  
  473.  
  474.  
  475.  
  476.  
  477.  
  478.  
  479.  
  480.  
  481.  
  482.  
  483.  
  484.  
  485.  
  486.  
  487.  
  488.  
  489.  
  490.  
  491.  
  492.  
  493.  
  494.  
  495.  
  496.  
  497.  
  498.  
  499.  
  500.  
  501.  
  502.  
  503.  
  504.  
  505.  
  506.  
  507.  
  508.  
  509.  
  510.  
  511.  
  512.  
  513.  
  514.  
  515.  
  516.  
  517.  
  518.  
  519.  
  520.  
  521.  
  522.  
  523.  
  524.  
  525.  
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.  
  533.  
  534.  
  535.  
  536.           
  537.  
  538.  
  539.           ERROR MESSAGES:
  540.  
  541.  
  542.           MISSING FILENAME(S)
  543.           You must enter two filenames after the KED command.
  544.  
  545.           BAD LOCATION FOR BEGIN
  546.           You can only enter a BEGIN after THEN, ELSE, WHILE or ITERATE.
  547.  
  548.           BAD LOCATION FOR BEGINNING-OF-EXECUTION (BX)
  549.           BEGINNING-OF-EXECUTION (BX) can only follow BEGINNING-OF-PROGRAM
  550.           or a complete definition.
  551.  
  552.           STRUCTURE NOT A COMPOUND STATEMENT
  553.           An END must match a BEGIN and if more than one instruction
  554.           follows a THEN, ELSE, WHILE or ITERATE it must be part of a
  555.           compound statement.
  556.  
  557.           BAD LOCATION FOR END PGM
  558.           END-OF-EXECUTION (NDX) can only be typed after all constructs
  559.           have been ended.
  560.  
  561.           ELSE NOT PAIRED WITH THEN
  562.           Remember to do an NDC if THEN is not followed by a compound
  563.           statement.
  564.  
  565.           COMMAND CAN'T BE INSERTED
  566.           BEGINNING-OF-EXECUTION and END-OF-EXECUTION cannot be inserted.
  567.  
  568.           END REQUIRED
  569.           It isn't necessary to type an NDC to end a construct that
  570.           contains a compound statement.  After END is typed an NDC is
  571.           automatically performed by KED.
  572.  
  573.           ALREADY IN INSERT MODE
  574.           Typing "i" while in insert mode will produce this message.
  575.  
  576.           INSERT ONLY AFTER END OF PROGRAM
  577.           Insert mode can only be used after END-OF-EXECUTION (NDX) has
  578.           been added.
  579.  
  580.           CAN'T INSERT INSIDE CONSTRUCT
  581.           See insert restrictions.
  582.  
  583.           LAST POSSIBLE LEVEL
  584.           NDC can't be performed beyond the last construct.
  585.  
  586.  
  587.  
  588.  
  589.  
  590.  
  591.  
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598.  
  599.  
  600.  
  601.  
  602.  
  603.           PLEASE COMPLETE CONSTRUCT
  604.           Exit from the insert mode is not allowed until all constructs
  605.           are completed.
  606.  
  607.           BAD LOCATION FOR DEFINITION
  608.           A definition can only follow BEGINNING-OF-PROGRAM or a
  609.           complete definition.
  610.  
  611.           MAXIMUM NUMBER OF DEFINITIONS EXCEEDED
  612.           A fixed number of definitions are allowed, even if some have been
  613.           deleted so that fewer than the maximum actually remain in the
  614.           program.  Saving the program, quitting the editor and then
  615.           invoking KED will allow additional definitions to replace those
  616.           deleted in the earlier session, although you still may not have
  617.           more than the allowable number definitions in a program.
  618.  
  619.           MAXIMUM NUMBER OF USES OF DEFINTION EXCEEDED
  620.           Only a fixed number of uses of each definition is allowed in your
  621.           program.
  622.  
  623.           INVALID TEST
  624.           The menu lists valid KED commands for tests.  No spaces should
  625.           precede or follow tests; a backspace or a control character will
  626.           produce an error.
  627.  
  628.           NEW NAME MUST BE UNIQUE
  629.           Each user-defined name must be different from KAREL's
  630.           instructions, tests and the edit commands. Although you may use
  631.           any number of characters, only the first eight will be recognized.
  632.  
  633.           INVALID CHARACTERS IN NEW NAME
  634.           Only letters, numbers and hyphens may be used in a new name and
  635.           the first character must be a letter.
  636.  
  637.           INVALID COMMAND
  638.           Be sure to type commands correctly.  It doesn't matter whether
  639.           you use capital or small letters but spaces before or after
  640.           entries, the backspace or any control character will all produce
  641.           an error.
  642.  
  643.           INSERT ONLY
  644.           After END-OF-EXECUTUION (NDX) has been added, the only way to add
  645.           instructions is to enter the insert mode.
  646.  
  647.           BAD LOCATION FOR COMMAND
  648.           An improper location has been chosen for a command.
  649.  
  650.           CAN'T BE DELETED
  651.           BEGINNING-OF-PROGRAM, BEGINNING-OF-EXECUTION, and END-OF-EXECUTION
  652.           cannot be deleted.
  653.  
  654.  
  655.  
  656.  
  657.  
  658.  
  659.  
  660.  
  661.  
  662.  
  663.  
  664.  
  665.  
  666.  
  667.  
  668.  
  669.  
  670.  
  671.  
  672.  
  673.  
  674.  
  675.  
  676.  
  677.  
  678.  
  679.  
  680.  
  681.  
  682.  
  683.  
  684.  
  685.  
  686.  
  687.  
  688.  
  689.  
  690.  
  691.  
  692.                         USER'S GUIDE FOR KAREL BATCH FILE
  693.  
  694.                         A World-Builder and Simulator for
  695.                                  KAREL the Robot
  696.  
  697.  
  698.  
  699.  
  700.  
  701.  
  702.  
  703.  
  704.  
  705.  
  706.  
  707.  
  708.  
  709.  
  710.  
  711.  
  712.  
  713.  
  714.  
  715.  
  716.  
  717.  
  718.  
  719.  
  720.  
  721.  
  722.  
  723.  
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730.  
  731.  
  732.  
  733.  
  734.             After   a   program  has  been  written   using   KED   (a
  735.           syntax-directed editor  for  KAREL the Robot), to create the
  736.           world in which the program  will  be  run and to execute the
  737.           program, type:
  738.  
  739.                karel filename1 filename2
  740.  
  741.           Filename1 should contain the file created in KED.  Filename2
  742.           is used to store KAREL's world.  If filename2 is a new file,
  743.           an  "empty  world" will be printed.  If filename2 is an  old
  744.           file, the  previously  created  world  it  contains  will be
  745.           printed.   Along with the new or old world, KAREL's  street,
  746.           avenue and direction and the number of beepers in his beeper
  747.           bag will  be  shown.   Then you will be asked if you want to
  748.           change KAREL's location, beeper locations or wall location. 
  749.           If by mistake an old filename is given that does not contain
  750.           an old  world,  you  can  exit  gracefully by not saving the
  751.           world.  After a few system messages, you can start over  and
  752.           no damage will have been done to your old file. 
  753.  
  754.             There  are  only  ten  streets (numbered 1  thru  10)  and
  755.           seventeen   avenues   (numbered   1   thru   17)   in   this
  756.           representation  of  KAREL's  world.  Street  0,  street  11,
  757.           avenue 0 and avenue  18  entries  will  be accepted for wall
  758.           building but  are not legal locations for KAREL or beepers. 
  759.           Although any number  of  beepers  can  be carried in KAREL's
  760.           beeper bag,  only  9 may be put at any corner of his world. 
  761.           No error  shutoff  will  occur  if  more than 9 are put at a
  762.           given corner but only 9 will appear  and  a  warning will be
  763.           printed on the screen; these beepers are effectively lost to
  764.           KAREL and cannot be recovered. 
  765.  
  766.             The following prompts will be given for changes to KAREL's
  767.           world; when entering a character (Y/N) only the character is
  768.           required (no  RETURN  need  be  typed)  but  a  number entry
  769.           requires a RETURN.
  770.  
  771.  
  772.           (1)  CHANGE KAREL'S LOCATION? (Y/N)
  773.                If "Y" is entered, you will be asked:
  774.                KAREL'S STREET?
  775.                KAREL'S AVENUE?
  776.                DIRECTION? (N/S/E/W)
  777.                At this point, KAREL will be shown on the screen.
  778.                IS KAREL'S LOCATION CORRECT? (Y/N)
  779.                If "N" is entered, the previous questions to change KAREL's
  780.                location will be repeated.  If "Y" is entered or if "N"
  781.                is entered in response to (1) above, you will be asked:
  782.  
  783.           (2)  CHANGE BEEPERS IN WORLD? (Y/N)
  784.                If "Y" is entered, you will be asked:
  785.                STREET?
  786.                AVENUE?
  787.  
  788.  
  789.  
  790.  
  791.  
  792.  
  793.  
  794.  
  795.  
  796.  
  797.  
  798.  
  799.                ENTER A TO ADD OR D TO DELETE BEEPER
  800.                At this point the beeper will be added or deleted from the
  801.                world.  If a beeper has been added, you will be asked:
  802.                IS BEEPER LOCATION CORRECT? (Y/N)
  803.                If "N" is entered, the beeper questions will be repeated.
  804.                If "Y" is entered or if a beeper has been deleted, you
  805.                will be asked:
  806.                OTHER BEEPER LOCATIONS? (Y/N)
  807.                If "Y" is entered, the beeper questions will be repeated.
  808.                If "N" is entered, you will be asked:
  809.  
  810.           (3)  CHANGE BEEPERS IN BAG? (Y/N)
  811.                If "Y" is entered, you will be asked:
  812.                HOW MANY BEEPERS IN BEEPER BAG?
  813.                0 BEEPERS IN BAG, CORRECT? (Y/N)
  814.                Here the number of beepers entered or 0 will be printed;
  815.                any non-number will be interpreted as 0.  Since typing
  816.                errors cannot be corrected, simply enter "N".  If "N" is
  817.                entered, the beeper bag questions will be repeated.  If
  818.                "Y" is entered or if "N" is entered in response to (2),
  819.                you will be asked:
  820.  
  821.           (4)  CHANGE WALL LOCATIONS? (Y/N)
  822.                IF "Y" is entered, you will be asked:
  823.                BETWEEN WHAT STREETS?
  824.                ?
  825.                BETWEEN WHAT AVENUES?
  826.                ?
  827.                A number followed by a RETURN should follow each "?".
  828.                If a number outside the accepted values for streets or
  829.                avenues is entered, that question will be repeated.
  830.                If the difference between the streets is one, the wall is
  831.                assumed to be horizontal.
  832.                ENTER A TO ADD OR D TO DELETE WALL
  833.                At this point you can see the addition or deletion of the
  834.                wall; a "+" will appear at corners.
  835.                IS WALL LOCATION CORRECT? (Y/N)
  836.                If "N" is entered, the wall will be erased and the wall
  837.                questions will be repeated.  If "Y" is entered, you will
  838.                be asked:
  839.                IS THIS THE LAST WALL? (Y/N)
  840.                If "N" is entered, the wall questions will be repeated.
  841.                If "Y" is entered or if "N" was entered in response to (3),
  842.                you will be asked:
  843.  
  844.           (5)  ANY FURTHER CHANGES TO THE WORLD? (Y/N)
  845.                IF "Y" is entered, all the questions will be repeated
  846.                starting with (1).  If "N" is entered, you will be asked:
  847.  
  848.           (6)  EXECUTE PROGRAM? (Y/N)
  849.                If "Y" is entered, the world will be saved in filename2 and
  850.                the tree in filename1 will be translated.  After a few
  851.                system messages are printed,  the initial state of the
  852.                world will be printed and KAREL's execution of the program
  853.  
  854.  
  855.  
  856.  
  857.  
  858.  
  859.  
  860.  
  861.  
  862.  
  863.  
  864.  
  865.                will be shown on the screen.  If there are problems (the
  866.                wrong file was used for filename2, for instance) then you
  867.                may enter "N".  You will then be asked:
  868.                EXIT KAREL? (Y/N)
  869.                If "Y" is entered then after a few system messages the
  870.                program will end.  If "N" is entered, you will be asked
  871.                again if you want to save the world (and start program
  872.                execution).
  873.  
  874.             As KAREL executes your program, his  direction  is printed
  875.           at  the  street  and  avenue of his current location, unless
  876.           beepers  are  also  located there.  If both  KAREL  and  any
  877.           beepers  are  at the same corner, only @ (one beeper), 2  (2
  878.           beepers), etc.  will be shown. 
  879.  
  880.             When the execution  has  been completed successfully, "END
  881.           OF EXECUTION" will be printed and  the  final  state  of the
  882.           world will remain on the screen,  along with KAREL's street,
  883.           avenue,  direction  and  the number of beepers in his beeper
  884.           bag at the end of execution.  At this point,  you may invoke
  885.           KED to make any changes in your program  then  run  the  new
  886.           syntax tree and the old world and try again. 
  887.  
  888.             If an error shutoff occurs, the program will be terminated
  889.           and one of the following messages will be printed:
  890.  
  891.  
  892.             1.  FRONT IS BLOCKED
  893.                 A move was attempted while KAREL was facing a wall.
  894.  
  895.             2.  NO BEEPERS IN BAG
  896.                 A putbeeper was attempted while there were no beepers in
  897.                 KAREL's beeper bag.
  898.  
  899.             3.  NO BEEPERS ON CORNER
  900.                 A pickbeeper was attempted at a location where there were
  901.                 no beepers.
  902.  
  903.             4.  NO TURNOFF EXECUTED
  904.                 The final turnoff instruction was omitted from the program.
  905.  
  906.             You may study the  state  of  the world which produced the
  907.           error and then invoke KED  to  make  appropriate  changes to
  908.           your program and try another run. 
  909.  
  910.  
  911.  
  912.  
  913.  
  914.  
  915.  
  916.  
  917.  
  918.  
  919.  
  920.  
  921.  
  922.  
  923.  
  924.  
  925.